package easyTodo.client.views.layouts;

import java.util.ArrayList;

import easyTodo.client.R;
import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.RelativeLayout;

public class DetailedListView extends RelativeLayout {
	public DetailedListView(Context context, View header, View footer) {
		super(context);
		init(context, header, footer);
	}

	public DetailedListView(Context context, AttributeSet attrs, View header,
			View footer) {
		super(context, attrs);
		init(context, header, footer);
	}

	public DetailedListView(Context context, AttributeSet attrs, int defStyle,
			View header, View footer) {
		super(context, attrs, defStyle);
		init(context, header, footer);
	}

	private void init(Context context, View header, View footer) {
		String infService = Context.LAYOUT_INFLATER_SERVICE;
		LayoutInflater li = (LayoutInflater) getContext().getSystemService(
				infService);
		View layoutRoot = li.inflate(R.layout.detailed_list, this, true);
		
		_listView = layoutRoot.f
		_aa = new ArrayAdapter<String>(context, R.layout.note_item, _items);
	}

	public void add(String view) {
		_items.add(view);
		_aa.notifyDataSetChanged();
	}

	private ArrayAdapter<String> _aa;
	private ListView _listView;
	private ArrayList<String> _items;
	private View _header;
	private View _footer;
}
